Matthias Clasen [Sun, 26 Apr 2020 14:19:44 +0000 (10:19 -0400)]
widget-factory: Make print a window action
We want to pass the parent window when opening
a print dialog, so this is naturally a window
action.
Matthias Clasen [Sun, 26 Apr 2020 14:02:11 +0000 (10:02 -0400)]
widget-factory: Some cosmetics
Hook the Print button on page 3 up to the app.print
action. This doesn't do anything now, but we might
use it to show a print dialog.
Matthias Clasen [Sun, 26 Apr 2020 14:00:14 +0000 (10:00 -0400)]
widget-factory: Improve the layout on page 3
Make the entries in the third column expand,
to align things.
Matthias Clasen [Sun, 26 Apr 2020 13:18:54 +0000 (09:18 -0400)]
reftests: Remove window-show-contents-on-map from xfails
This test passes now.
Matthias Clasen [Sun, 26 Apr 2020 13:16:25 +0000 (09:16 -0400)]
reftests: Fix the window-show-contents-on-map test
Despite the name, the test was not in fact showing
contents on map anymore, since widgets are visible
by default. Setting visible to FALSE makes the test
work as expected again.
Matthias Clasen [Sun, 26 Apr 2020 13:17:42 +0000 (13:17 +0000)]
Merge branch 'clipboard-demo-fixes' into 'master'
More gtk-demo fixes
See merge request GNOME/gtk!1764
Matthias Clasen [Sun, 26 Apr 2020 13:09:35 +0000 (13:09 +0000)]
Merge branch 'wip/exalm/titlebuttons' into 'master'
GtkWindowControls + GtkHeaderBar cleanups
See merge request GNOME/gtk!1755
Alexander Mikhaylenko [Sat, 25 Apr 2020 19:34:19 +0000 (00:34 +0500)]
docs: Add GtkWindowControls to docs
Alexander Mikhaylenko [Fri, 24 Apr 2020 15:55:43 +0000 (20:55 +0500)]
headerbar: Use GtkWindowControls
Now that the title buttons are encapsulated in a separate widget, use
it in the header bar.
Hide them when empty, so that they don't add extra spacing.
Alexander Mikhaylenko [Fri, 24 Apr 2020 12:56:52 +0000 (17:56 +0500)]
Add GtkWindowControls
Move some code out of GtkHeaderBar and into a separate widget, making it
reusable in process.
See https://gitlab.gnome.org/GNOME/gtk/issues/2242
Matthias Clasen [Sun, 26 Apr 2020 04:45:06 +0000 (00:45 -0400)]
widget-factory: Update copyright year
Matthias Clasen [Sun, 26 Apr 2020 04:44:48 +0000 (00:44 -0400)]
gtk-demo: Update copyright year
Matthias Clasen [Sun, 26 Apr 2020 04:09:31 +0000 (00:09 -0400)]
gtk-demo: Remove the colorsel demo
We already have a color selector demo in "Pickers".
Matthias Clasen [Sun, 26 Apr 2020 03:33:33 +0000 (23:33 -0400)]
gtk-demo: Minor cosmetic fixes
Some minor cosmetic fixes to some of the demos.
Matthias Clasen [Sun, 26 Apr 2020 02:14:25 +0000 (22:14 -0400)]
gtk-demo: Improve the dnd demo
The DND demo didn't have DND, since it was first created!
Time to fix this. Copying most of testdnd3.c here.
Matthias Clasen [Sun, 26 Apr 2020 02:13:33 +0000 (02:13 +0000)]
Merge branch 'clipboard-demo-fixes' into 'master'
Clipboard demo fixes
See merge request GNOME/gtk!1762
Matthias Clasen [Sun, 26 Apr 2020 01:16:02 +0000 (21:16 -0400)]
gtk-demo: Polish the clipboard demo
The DND part of this demo was broken by recent
icon theme changes. Make it work again.
And make the demo nicer by breaking out a
DemoImage widget.
Matthias Clasen [Sun, 26 Apr 2020 01:03:57 +0000 (21:03 -0400)]
Move the idle sizer to the gtkroot.c
This is needed since we already have a second GtkRoot
implementation with GtkDragIcon, and DND is causing
critical warnings due to this.
Matthias Clasen [Sat, 25 Apr 2020 19:26:36 +0000 (19:26 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1761
Matthias Clasen [Sat, 25 Apr 2020 17:26:14 +0000 (13:26 -0400)]
reftests: Remove background-image-multiple from xfails
It no longer fails.
Matthias Clasen [Sat, 25 Apr 2020 17:18:34 +0000 (13:18 -0400)]
fixed: Fix an oversight in size requisition
We need to take orientation into account when applying
child transforms. This is what broke the background-image-multiple
reftest.
Matthias Clasen [Sat, 25 Apr 2020 16:56:18 +0000 (16:56 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Fix menu keynav
See merge request GNOME/gtk!1760
Matthias Clasen [Sat, 25 Apr 2020 16:47:17 +0000 (12:47 -0400)]
reftests: Use transform syntax
This is supposed to fix the background-image-multiple
reftest, but it doesn't. There's an actual bug here.
Matthias Clasen [Sat, 25 Apr 2020 16:14:04 +0000 (12:14 -0400)]
menu: Dismiss submenus during keynav
We need to dismiss submenus explicitly on left arrow,
otherwise the grab interferes with our keynav.
Matthias Clasen [Sat, 25 Apr 2020 15:54:29 +0000 (11:54 -0400)]
Cosmetics
Reduce casting.
Matthias Clasen [Sat, 25 Apr 2020 15:46:43 +0000 (11:46 -0400)]
menu: Ignore leaves due to grabs
When we open a submenu we get a leave due to the grab,
but we don't want to unset the active item then.
Matthias Clasen [Sat, 25 Apr 2020 15:37:41 +0000 (15:37 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Don't autoinclude backend-specific headers
See merge request GNOME/gtk!1759
Piotr Drąg [Sat, 25 Apr 2020 11:38:18 +0000 (13:38 +0200)]
Update POTFILES.in
Matthias Clasen [Sat, 25 Apr 2020 01:38:52 +0000 (21:38 -0400)]
gsk: Don't autoinclude backend-specific headers
Don't install headers for code that we don't build.
And don't include those headers in gsk.h.
Just as we do in gdk, require applications to include
the backend-specific headers they need explicitly.
Update the one affected demo, gtk4-node-editor.
Matthias Clasen [Sat, 25 Apr 2020 01:12:20 +0000 (21:12 -0400)]
widget-factory: Improve the theme selector
Implement the "Current style" choice using
gtk_settings_reset_property, so we go back to
following the settings changes.
Matthias Clasen [Sat, 25 Apr 2020 00:29:33 +0000 (00:29 +0000)]
Merge branch 'wip/carlosg/input-fixes' into 'master'
Some input fixes
See merge request GNOME/gtk!1757
Matthias Clasen [Fri, 24 Apr 2020 23:07:23 +0000 (23:07 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1758
Matthias Clasen [Fri, 24 Apr 2020 22:35:22 +0000 (18:35 -0400)]
testsuite: Take textview-border-windows out of xfails
The textview-border-window reftest passes now, so
take it out of the xfails.
Matthias Clasen [Fri, 24 Apr 2020 22:33:57 +0000 (18:33 -0400)]
reftests: Avoid text caret from interfering
We are comparing a transparent label to a transparent
text view, so need to make sure the caret does not show
up in the text view to ruin the comparison.
Carlos Garnacho [Fri, 24 Apr 2020 22:09:41 +0000 (00:09 +0200)]
gtktexthandle: Set parent through API call
The GtkWidget::parent property went readonly, use the API call
to ensure the text handle has a parent set.
Carlos Garnacho [Fri, 24 Apr 2020 21:14:51 +0000 (23:14 +0200)]
gtktreeview: Ensure to transiently prelight on touch input
Some machinery (like clicking on expander) relies on prelight state
being up to date, but we don't set prelight on touch events. Do that
transiently, as long as a row is clicked.
Fixes tapping on expanders.
Carlos Garnacho [Fri, 24 Apr 2020 21:11:00 +0000 (23:11 +0200)]
gdk/wayland: Ensure to clean up stale touchpoint data on surface destroy
If the wl_surface receiving touch events is destroyed, we will get no
wl_touch.up event to remove the touchpoint from our internal accounting.
Check for this, and drop touchpoints happening in surfaces that do
disappear during operation.
Carlos Garnacho [Fri, 24 Apr 2020 21:06:52 +0000 (23:06 +0200)]
gtkpopover: Roll back properly if presenting the popup fails
If the popover fails to be shown, it would internally undo visible
and mapped state. If we just proceed as normal, the widget enters
in inconsistent state, and a grab remains issued on the invisible
widget, preventing further input from the input device.
Carlos Garnacho [Fri, 24 Apr 2020 21:04:27 +0000 (23:04 +0200)]
gtkwindow: Correct device check
This function to revoke implicit grabs may be called with a NULL
device, which means all devices should be revoked. Fix the check
so this actually happens.
Fixes implicit grabs (maybe) being unset in result to a GTK grab.
Carlos Garnacho [Fri, 24 Apr 2020 21:03:13 +0000 (23:03 +0200)]
gtkwindowgroup: Take default group into account when listing windows
Otherwise, no windows belong to the default group, paradoxically.
Matthias Clasen [Fri, 24 Apr 2020 20:50:01 +0000 (20:50 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1756
Carlos Garnacho [Fri, 24 Apr 2020 20:21:08 +0000 (22:21 +0200)]
gtkpadcontroller: Avoid filling action list with empty elements
We don't need to set the array size if we are adding elements afterwards.
Carlos Garnacho [Fri, 24 Apr 2020 20:20:09 +0000 (22:20 +0200)]
demos: Initialize brush size in "paint" demo
Otherwise lines end up with 0 thickness.
Matthias Clasen [Fri, 24 Apr 2020 19:20:58 +0000 (15:20 -0400)]
testsuite: Take border-color-transparent out of xfails
The border-color-transparent reftest passes now, so
take it out of the xfails.
Matthias Clasen [Fri, 24 Apr 2020 19:19:24 +0000 (15:19 -0400)]
reftests: Avoid theme influence
Reset to defaults in background-color-transparent,
to avoid theme influence in the results.
Matthias Clasen [Fri, 24 Apr 2020 19:18:02 +0000 (15:18 -0400)]
reftests: Avoid decorations
Window decorations always cause trouble between ci
and local test runs, so turn them off for the
background-color-transparent reftest.
Alexander Mikhaylenko [Fri, 24 Apr 2020 13:08:49 +0000 (18:08 +0500)]
headerbar: Remove decoration-layout-set property
It's unnecessary and only complicates the API. Use decoration-layout if
it's not NULL, and GtkSettings otherwise.
Alexander Mikhaylenko [Fri, 24 Apr 2020 15:03:12 +0000 (20:03 +0500)]
headerbar: Remove title button separators
They have had opacity: 0 for a while, just remove them.
Alexander Mikhaylenko [Fri, 24 Apr 2020 18:50:43 +0000 (23:50 +0500)]
testsuite: Fix swapped params in notify test
The expected and counted params are swapped in literally every call, so
swapping the params to match them.
Matthias Clasen [Thu, 23 Apr 2020 19:24:59 +0000 (19:24 +0000)]
Merge branch 'grab-leftovers' into 'master'
Drop gtk_widget_has_grab
See merge request GNOME/gtk!1752
Matthias Clasen [Thu, 23 Apr 2020 17:23:24 +0000 (13:23 -0400)]
Drop gtk_widget_has_grab
This was just a leftover in our public api.
All other grab-related apis are gone.
Benjamin Otte [Thu, 23 Apr 2020 15:26:30 +0000 (15:26 +0000)]
Merge branch 'wip/exalm/window-headerbar' into 'master'
First steps for #2242
See merge request GNOME/gtk!1739
Matthias Clasen [Thu, 23 Apr 2020 15:20:54 +0000 (15:20 +0000)]
Merge branch 'focus-ring-experiment' into 'master'
Tweak visible focus behavior
See merge request GNOME/gtk!1750
Alexander Mikhaylenko [Wed, 22 Apr 2020 17:56:52 +0000 (22:56 +0500)]
window: Stop listening to headerbar title changes
Remove another dependency.
Alexander Mikhaylenko [Wed, 22 Apr 2020 17:39:40 +0000 (22:39 +0500)]
headerbar: Update window buttons automatically
Update the layout when any of the following properties changes:
* modal
* transient-for
* resizable
* deletable
Stop updating it from GtkWindow, make that function static.
Matthias Clasen [Tue, 21 Apr 2020 22:14:40 +0000 (18:14 -0400)]
window: Tweak visible focus behavior
Only turn on visible focus when a key event actually leads
to a change in focus location (ie, 'keynav').
Make the visible focus disappear after 5 seconds of no
keyboard interaction, to avoid permanent focus ring
distraction.
As an extra bonus, make it so that we make the focus
visible while the Alt key is pressed. This gives us
a 'find my focus!' shortcut, and goes well with the
prexisting use of Alt for finding mnemonics.
Discussed in: #2644
Jakub Steiner [Thu, 23 Apr 2020 11:44:47 +0000 (11:44 +0000)]
Merge branch 'wip/jimmac/uniform-checkboxes' into 'master'
Adwaita: lower glyph contrast for checkboxes
See merge request GNOME/gtk!1745
Jakub Steiner [Thu, 23 Apr 2020 08:53:02 +0000 (10:53 +0200)]
Adwaita: lower glyph contrast for checkboxes
- stylistic choice didn't sit well with majority of the design team
Matthias Clasen [Thu, 23 Apr 2020 04:02:12 +0000 (04:02 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
menusectionbox: Improve circular button spacing
Closes #2626
See merge request GNOME/gtk!1743
Matthias Clasen [Thu, 23 Apr 2020 02:42:04 +0000 (22:42 -0400)]
Adwaita: Add padding to circular button rows in menus
The lack of this was negatively affecting the spacing
of these buttons.
Fixes: #2626
Matthias Clasen [Thu, 23 Apr 2020 02:16:46 +0000 (22:16 -0400)]
menusectionbox: Improve circular button spacing
In the n == 2 case, we want to avoid the buttons being
drawn all the way out to the ends of the box, but in the
n >= 3 case, that is exactly what we want for the first
and last button.
Benjamin Otte [Thu, 23 Apr 2020 00:13:26 +0000 (00:13 +0000)]
Merge branch 'fix-icontheme-invalidation' into 'master'
Fix icontheme invalidation
See merge request GNOME/gtk!1733
Matthias Clasen [Wed, 22 Apr 2020 22:23:45 +0000 (18:23 -0400)]
Drop gtk_widget_reset_style
There was a single call left that should not be necessary.
Also drop no longer used attached-window functionality.
Matthias Clasen [Tue, 21 Apr 2020 19:57:37 +0000 (15:57 -0400)]
Drop gtk_style_context_reset_widgets
This is no longer used.
Matthias Clasen [Tue, 21 Apr 2020 20:26:36 +0000 (16:26 -0400)]
widget: Update when font settings change
Update the pango context when font-related settings
change, using the new GtkSystemSetting mechanism.
Matthias Clasen [Tue, 21 Apr 2020 16:11:15 +0000 (12:11 -0400)]
image: Invalidate icon helper when icon theme changes
This is necessary to drop the cached image.
Matthias Clasen [Tue, 21 Apr 2020 14:44:36 +0000 (10:44 -0400)]
icontheme: Call gtk_system_setting_changed
When the icon theme changes, we want to both initiate
a css SOURCE change (since css values may depend on the
icon theme), as well as calling gtk_system_setting_changed,
since widgets need to drop cached images, e.g. in GtkIconHelper.
Matthias Clasen [Tue, 21 Apr 2020 19:45:21 +0000 (15:45 -0400)]
settings: Call gtk_system_setting_changed
Replace calls to gtk_style_context_reset_widgets by
gtk_system_setting_changed, with the appropriate setting,
and add style invalidation where required.
Matthias Clasen [Tue, 21 Apr 2020 20:56:42 +0000 (16:56 -0400)]
window: Use gtk_system_setting_change
Propagate GTK_SYSTEM_SETTING_DISPLAY when the display
of the window changes.
Matthias Clasen [Tue, 21 Apr 2020 16:05:45 +0000 (12:05 -0400)]
widget: Add a system_setting_changed vfunc
This gives us a hook to walk the widget tree whenever a global
setting changes and do per-widget invalidations. This will
replace gtk_style_context_reset_widgets().
Matthias Clasen [Wed, 22 Apr 2020 17:49:18 +0000 (13:49 -0400)]
css: Compare icon theme serials
When comparing to icon theme image values for equality,
take the serial of the icon theme at compute time into
account.
Emmanuele Bassi [Wed, 22 Apr 2020 19:23:17 +0000 (19:23 +0000)]
Merge branch 'ci-custom-layout' into 'master'
Fix annotations for GtkCustomLayout
See merge request GNOME/gtk!1740
Matthias Clasen [Wed, 22 Apr 2020 17:47:17 +0000 (13:47 -0400)]
icontheme: Keep a serial
This will let us identify when we have to re-lookup
icons because they may have changed despite the theme
object being the same.
Emmanuele Bassi [Wed, 22 Apr 2020 18:24:45 +0000 (19:24 +0100)]
Fix annotations for GtkCustomLayout
Silence the warnings from the introspection scanner.
Alexander Mikhaylenko [Wed, 22 Apr 2020 17:32:10 +0000 (22:32 +0500)]
window: Introduce actions for window buttons
Add the following actions:
* window.close
* window.toggle-maximize
* window.minimize
Ensure they are disabled when not appropriate, such as for modal windows.
Use them in GtkHeaderBar.
Alexander Mikhaylenko [Wed, 22 Apr 2020 17:18:12 +0000 (22:18 +0500)]
header-bar: Track window icon changes
Listen to icon-name changes if it's in a GtkWindow. This allows to remove a
special case for headerbar-as-titlebar from GtkWindow.
Alexander Mikhaylenko [Wed, 22 Apr 2020 16:35:32 +0000 (21:35 +0500)]
header-bar: Don't assume there's only one icon
Instead of tracking the titlebar icon widget, and updating it when the icon
changes, update the window buttons completely.
Matthias Clasen [Tue, 21 Apr 2020 12:46:35 +0000 (08:46 -0400)]
css: Drop the -gtk-icon-theme property
We want to always use the current icon theme, and only
have the minimum amount of custom properties.
Matthias Clasen [Wed, 22 Apr 2020 00:41:59 +0000 (20:41 -0400)]
css: Get the icon theme via the settings
We don't have a css value for it anymore, but we
still need the current icon theme to interpret
icon names.
Matthias Clasen [Tue, 21 Apr 2020 12:37:04 +0000 (08:37 -0400)]
Stop using the -gtk-icon-theme style property
We want to just use the current icon theme, always.
Alexander Mikhaylenko [Wed, 22 Apr 2020 16:24:37 +0000 (21:24 +0500)]
header-bar: Stop showing application menu
The application menu isn't particular relevant anymore, and the support for
showing fallback appmenu as a headerbar icon is one of the things tying
GtkWindow to GtkHeaderBar.
Remove support for "menu" window decoration element completely, update
GtkHeaderBar docs.
Alexander Larsson [Wed, 22 Apr 2020 12:20:33 +0000 (14:20 +0200)]
icon-theme: Fix deadlock in GktIconTheme dispose
When freeing the display GtkIconTheme and that was the last owner we
ran into a deadlock, because we unref the "next-to-last" ref inside a
gtk_icon_theme_ref_aquire/release() pair, which makes the final unref
to happen in the release(), while the ref lock still was held.
The unref triggers dispose which tries to NULL out the ref, but that then
deadlocks on the mutex being held by the caller already.
We fix this by moving the release unref outside the lock. This is safe
because refcounts are atomic, and we *do* own the ref.
Jakub Steiner [Wed, 22 Apr 2020 11:47:54 +0000 (11:47 +0000)]
Merge branch 'wip/jimmac/HC-slider-border' into 'master'
HC: fix switch slider borders
See merge request GNOME/gtk!1737
Jakub Steiner [Wed, 22 Apr 2020 09:51:27 +0000 (11:51 +0200)]
HC: fix switch slider borders
- HC got caught up on a condition made for color (suggested) buttons.
the rule just made the slider a tag lighter on dark probably due to the
overlaid AA making it stronger. Got rid of it for now, if someone cares
enough we can reintroduce an exception (that doesn't break HC).
Matthias Clasen [Tue, 21 Apr 2020 22:27:57 +0000 (22:27 +0000)]
Merge branch 'fix-placesview-popover' into 'master'
placesview: Fix up the address entry help popover
Closes #2642
See merge request GNOME/gtk!1731
Emmanuele Bassi [Tue, 21 Apr 2020 21:56:43 +0000 (21:56 +0000)]
Merge branch 'missing-annotation' into 'master'
widget: Add missing callback annotation
See merge request GNOME/gtk!1732
Matthias Clasen [Tue, 21 Apr 2020 21:11:53 +0000 (21:11 +0000)]
Merge branch 'wip/chergert/fix-toggle-caret-visibility' into 'master'
textview: fix assertion when toggling caret visibility
Closes #2647
See merge request GNOME/gtk!1736
Christian Hergert [Tue, 21 Apr 2020 20:39:50 +0000 (13:39 -0700)]
textview: fix assertion when toggling caret visibility
When toggling caret visibility (with F7) we would hit an assertion if the
cursor is currently blinking. This adjusts things to ensure that we should
be showing the carent when scheduling our blink timeouts.
Fixes #2647
Matthias Clasen [Tue, 21 Apr 2020 19:35:44 +0000 (19:35 +0000)]
Merge branch 'menu-section-title' into 'master'
Menu section title
See merge request GNOME/gtk!1735
Matthias Clasen [Tue, 21 Apr 2020 18:55:14 +0000 (14:55 -0400)]
Adwaita: Some styling for menu section titles
More fine-tuning needed.
Matthias Clasen [Tue, 21 Apr 2020 18:48:39 +0000 (14:48 -0400)]
Change the approach to menu section titles
Put the label below the separator, and give
it the title style class.
Florian Müllner [Tue, 21 Apr 2020 14:08:10 +0000 (16:08 +0200)]
widget: Add missing callback annotation
GI can only figure out the correct scope if there's a GDestroyNotify
or GAsyncReadyCallback parameter.
Claudio Saavedra [Tue, 21 Apr 2020 12:37:45 +0000 (15:37 +0300)]
docs: migration guide fixes
Claudio Saavedra [Tue, 21 Apr 2020 11:49:13 +0000 (14:49 +0300)]
docs: fix typo
Matthias Clasen [Tue, 21 Apr 2020 11:43:52 +0000 (07:43 -0400)]
placesview: Fix up the address entry help popover
Popovers without parent don't work anymore. Set a
parent, a fix up the position.
Fixes: #2642
Jakub Steiner [Tue, 21 Apr 2020 11:08:28 +0000 (11:08 +0000)]
Merge branch 'wip/jimmac/hc-public-colors' into 'master'
HC: export public colors
Closes #2641
See merge request GNOME/gtk!1730
Jakub Steiner [Tue, 21 Apr 2020 10:39:34 +0000 (12:39 +0200)]
HC: export public colors
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2641
Matthias Clasen [Tue, 21 Apr 2020 04:32:23 +0000 (00:32 -0400)]
3.98.3
Matthias Clasen [Tue, 21 Apr 2020 03:14:25 +0000 (23:14 -0400)]
Fix label accessibility
Emit accessible change signals after setting the
new selection limits. This was broken in
commit
f6bedd0d5e4c8f7b, and showed up as broken
accessibility tests.
Matthias Clasen [Mon, 20 Apr 2020 21:20:57 +0000 (21:20 +0000)]
Merge branch 'container-focus-cleanup' into 'master'
Strip down GtkContainer
See merge request GNOME/gtk!1722